﻿
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>详细资料</title>
        <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport"/>
        <meta content="yes" name="apple-mobile-web-app-capable"/>
        <meta content="black" name="apple-mobile-web-app-status-bar-style"/>
        <meta content="telephone=no" name="format-detection"/>
        <link href="student_card_info_css1.css" rel="stylesheet" />
    
    </head>
    <body onload="getStudentId()">


        <section class="aui-flexView">
            
            <section class="aui-scrollView">
                <div class="aui-datum-box" id ="name_view">
                    <div class="aui-datum-box-img">
                        <img src="images/user-logo-001.png" alt="" id ="avatar">
                    </div>
                 
                    <h2>姓名 <em><img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/boy.png" alt=""></em></h2>
                </div>
               <div class="aui-datum-list">
                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/school.png" />
                       </div>
                       <div class="aui-flex-box b-line" id ="school">
                           <h3></h3>
                       </div>
                   </div>
                         <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/number.png" />
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>编号</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/work.png" />
                       </div>
                       <div class="aui-flex-box b-line" id ="snumber">
                           <h3>互联网</h3>
                       </div>
                   </div>
                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/phone.png" alt=""/>
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>联系方式</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">
                       <div class="aui-datum-icon">
                          <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/phone_sub.png" />
                       </div>
                       <div class="aui-flex-box" id="phone">
                           <h3>联系方式</h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/phone_sub.png" />
                       </div>
                       <div class="aui-flex-box" id="parentnumber">
                           <h3>联系方式2</h3>
                       </div>
                   </div>

                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/qq.png" />
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>QQ</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/qq_sub.png" />
                       </div>
                       <div class="aui-flex-box" id ="qq">
                           <h3>QQ</h3>
                       </div>
                   </div>

                   <!--微信-->
                       <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/wechat.png" />
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>微信</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/wechat_sub.png" />
                       </div>
                       <div class="aui-flex-box" id ="wechat">
                           <h3>微信</h3>
                       </div>
                   </div>

                   <!--加入时间-->
                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/time.png" />
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>加入时间</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/time_sub.png" />
                       </div>
                       <div class="aui-flex-box" id ="jointime">
                           <h3>加入时间</h3>
                       </div>
                   </div>

                   <div class="aui-flex">
                       <div class="aui-datum-icon">
                           <img src="http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/info.png" />
                       </div>
                       <div class="aui-flex-box">
                           <h3><b>个人简介</b></h3>
                       </div>
                   </div>
                   <div class="aui-flex aui-flex-open">

                       <div class="aui-flex-box" id ="infomation">
                         <p></p>
                       </div>
                   </div>
               </div>
            </section>
        </section>

    </body>
    <script src="../../backstage/lib/jquery/1.9.1/jquery.min.js"></script>
     <script>
         function GetQueryString(name) {
             var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
             var r = window.location.search.substr(1).match(reg);//search,查询？后面的参数，并匹配正则
             if (r != null) return unescape(r[2]); return null;
         }



         // 1.获取学生学号
         function getStudentId() {
             var sid = GetQueryString('id');
      
             $.ajax({
                 url: '../../ChireInter/Students/Students_Info.ashx',
                 data: { id: sid },
                 type: 'post',
                 dataType: 'json',
                 success: function (res) {
                 
                     if (res.errCode == 200) {
                         // 1.头像 
                         var name_view = $('#name_view');
                         var name_view_html = "";
                         name_view_html += "<div class=\"aui-datum-box-img\">";
                         name_view_html += "<img src=\""+ res.data.avatar +"\" alt=\"\" id =\"avatar\">";
                         name_view_html += "</div>";
                         if (res.data.gender == "男") {
                             name_view_html += "<h2>" + res.data.name + " <em><img src=\"http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/boy.png\" alt=\"\"></em></h2>";
                         } else {
                             name_view_html += "<h2>" + res.data.name + " <em><img src=\"http://chire.oss-cn-hangzhou.aliyuncs.com/web/icon/Student_card/girl.png\" alt=\"\"></em></h2>";
                         }
                         
                         name_view.html(name_view_html);
                       
                         // 2.
                         var school_view = $('#school');
                         var school_view_html = "";
                         school_view_html += "<h3>"+res.data.school+"</h3>"
                         school_view.html(school_view_html);

                         // 3. 联系方式
                         var phone_view = $('#phone');
                         var phone_view_html = "";
                         phone_view_html += "<h3>" + res.data.phone + "</h3>"
                         phone_view.html(phone_view_html);

                         // 3. 联系方式2
                         var phone_view2 = $('#parentnumber');
                         var phone_view_html2 = "";
                         phone_view_html2 += "<h3>" + res.data.parentnumber + "</h3>"
                         phone_view2.html(phone_view_html2);

                         // 4. 学号
                         var snumber_view = $('#snumber');
                         var snumber_view_html2 = "";
                         snumber_view_html2 += "<h3>" + res.data.snumber + "</h3>"
                         snumber_view.html(snumber_view_html2);
                         
                         // 5. qq
                         var qq_view = $('#qq');
                         var qq_view_html2 = "";
                         qq_view_html2 += "<h3>" + res.data.qq + "</h3>"
                         qq_view.html(qq_view_html2);

                         // wechat
                         var wechat_view = $('#wechat');
                         var wechat_view_html2 = "";
                         wechat_view_html2 += "<h3>" + res.data.wechat + "</h3>"
                         wechat_view.html(wechat_view_html2);
                         
                         // 加入时间
                         var jointime_view = $('#jointime');
                         var jointime_view_html = "";
                         jointime_view_html += "<h3>" + res.data.jointime + "</h3>"
                         jointime_view.html(jointime_view_html);
                         
                         // 资料
                         var infomation_view = $('#infomation');
                         var infomation_view_html = "";
                         infomation_view_html += "<h3>" + res.data.infomation + "</h3>"
                         infomation_view.html(infomation_view_html);
                        
                     
                     } else {
                         alert('提交失败');
                     }
                 },
                 error: function (err) {
                     alert('提交失败' + err);
                 }
             })
           
         }


     </script>

</html>
